package com.gxa.autoparts.admin.service.impl;

import com.gxa.autoparts.admin.mapper.CouponGetMapper;
import com.gxa.autoparts.admin.service.CouponGetService;
import com.gxa.autoparts.core.pojo.CouponGet;
import com.gxa.autoparts.core.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author R
 * @data 2022-01-11 9:10
 */
@Service
public class CouponGetServiceImpl extends BaseServiceImpl<CouponGet> implements CouponGetService {

    @Autowired
    CouponGetMapper couponGetMapper;

    @Override
    public void useCoupon(Long userId, Long couponId) {
        couponGetMapper.useCoupon(userId,couponId);
    }

    @Override
    public void returnCoupon(Long userId, Long couponId) {
        couponGetMapper.returnCoupon(userId,couponId);
    }
}
